gg.setConfig(2131427463, 6) --隐藏23
local setAppSelectByAuto = 0
for k,v in pairs(gg.getProcess()) do
    if string.find(v.cmdLine, "com.netease.sky") ~=nil or v.cmdLine=="com.tencent.tmgp.eyou.eygy" then
        if string.find(v.cmdLine, "PushService") ==nil then
            setAppSelectByAuto = setAppSelectByAuto+1
            Select=v.cmdLine
        end
    end
end
if setAppSelectByAuto == 0 then
    print("未识别到光遇进程，请手动选择并重新运行脚本")
    gg.setProcessX()
  elseif setAppSelectByAuto == 1 then
    gg.setProcess(Select)
    gg.toast("已为你自动选择进程"..Select.."如需更换请自行前往设置")
  elseif setAppSelectByAuto >= 2 then
    gg.toast("你打开的光遇不止一个，请自行设置光遇进程")
    gg.setProcessX()
end
gg.sleep(2000)
function bc(a,b,c) local a={{address =a,flags =b,name=c}} gg.addListItems(a) return gg.getValues(a) end
function dz(a,b,c,d) mmm={{address=a,flags=b,value=c,freeze=d} } gg.setValues(mmm) gg.addListItems(mmm) return gg.getValues(mmm) end

function calcPointer(baseAddress, offsets,name)--多级跳转
local addr = tonumber(baseAddress)
for i, offset in ipairs(offsets) do
   if i==#offsets then break end--最后一级不跳
    addr = addr + tonumber(offset)
    addr = gg.getValues({[1]={address=addr,flags=32}})[1].value
        if addr==0 then
        gg.toast(name..'获取失败')
    --    print(name..'获取失败')
        break
    end
end
bc(addr+offsets[#offsets],4,name)
return addr+offsets[#offsets]
end

local so=gg.getRangesList('libBootloader.so')[1].start

zs1 = calcPointer(so,{0x2ABC270,0x190},"帧率1")



k="关"
FX= "Main"
function Main1()   
 FX= "Main"
SN = gg.choice({
	 "帧率增强状态："..k,
}, nil, "by晚风  1.0定制+Q:2268587124")
if SN==1 then
  
  if k == "关" then
     dz(zs1,1,120,true)
     gg.toast("帧率增强开启成功")
      k='开'
  elseif k == "开" then
  dz(zs1,1,20,true)
    gg.toast("帧率增强关闭成功")
      k='关'
  end




end

FX=-1
end
while true do
    if gg.isVisible(true) then
        gg.setVisible(false)
        Main1()
    end
end

